package com.cunjin.student.dao;

import java.util.List;
import java.util.Map;

import com.cunjin.base.dao.BaseDao;
import com.cunjin.student.entity.StudentEntity;

public interface StudentDao extends BaseDao<StudentEntity> {
	
	/**
	 * 登陆
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	StudentEntity login(StudentEntity entity) throws Exception;

	/**
	 * 根据loginno判断是否注册了相同的学号
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	StudentEntity queryByloginNo(StudentEntity entity) throws Exception;

	/**
	 * 录入一个学生
	 * @param entity
	 * @return
	 */
	int insertStudent(StudentEntity entity);

	/**
	 * eauy分页 
	 * @param pages 分页条件==searchName 搜索关键词  before页码数   after每页显示的条数
	 * @return
	 */
	List<StudentEntity> myqueryByPage(Map<String, Object> pages) throws Exception;

	/**
	 * 由关键词搜索出来的条数
	 * @param pages
	 * @return
	 */
	int findAllByName(Map<String, Object> pages) throws Exception;

	int deleteByids(String[] split) throws Exception;

	StudentEntity selectByid(int sid) throws Exception;
	
	
	StudentEntity selectByNameAndDormitoryName(Map<String, Object> pages);

	
   
}